﻿using Nop.Core;
using Nop.Core.Domain.WindAlert;
using System;
using System.Collections.Generic;

namespace Nop.Services.WindAlert
{
    /// <summary>
    /// Winddata service
    /// </summary>
     public partial interface IWaveDataService
     {
        #region Methods

        /// <summary>
        /// Clears a log
        /// </summary>
        void ClearAll();

        /// <summary>
        /// Deletes a windData
        /// </summary>
        /// <param name="windData">WindData</param>
        void DeleteWaveData(WaveData waveData);

        /// <summary>
        /// Gets all waveDatas
        /// </summary>
        /// <param name="showHidden">A value indicating whether to show hidden records</param>
        /// <returns>wave data collection</returns>
        IList<WaveData> GetAllWaveData();

        /// <summary>
        /// Gets all waveDatas
        /// </summary>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        /// <param name="showHidden">A value indicating whether to show hidden records</param>
        /// <returns>wave data</returns>
        IPagedList<WaveData> GetAllWaveData(int pageIndex, int pageSize);

        /// <summary>
        /// Gets all wavedata items
        /// </summary>
        /// <param name="fromUtc">wavedata item creation from; null to load all records</param>
        /// <param name="toUtc">wavedata item creation to; null to load all records</param>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        /// <returns>wavedata item collection</returns>
        IPagedList<WaveData> GetAllWaveData(DateTime? fromUtc, DateTime? toUtc, int pageIndex, int pageSize);

        /// <summary>
        /// Gets a waveData
        /// </summary>
        /// <param name="waveDataId">wave data identifier</param>
        /// <returns>wave data</returns>
        WaveData GetWaveDataById(int waveDataId);

        /// <summary>
        /// Get wave data items by identifiers
        /// </summary>
        /// <param name="waveataIds">wavedata item identifiers</param>
        /// <returns>Wavedata items</returns>
        IList<WaveData> GetWaveDataByIds(int[] waveaDataIds);

        /// <summary>
        /// Get wwave data itemby spot Id
        /// </summary>
        /// <param name="SpotIds">spot identifiers</param>
        /// <returns>Wavedata items</returns>
        IList<WaveData> GetWaveDataBySpotId(int spotId, int backHours = 0);

        /// <summary>
        /// Get wave data item by spot Id top 1
        /// </summary>
        /// <param name="spotIds">spot identifiers</param>
        /// <returns>wavedata items</returns>
        WaveData GetWaveDataBySpotIdTop1(int spotId);

        /// <summary>
        /// Inserts a waveData
        /// </summary>
        /// <param name="waveData">Wave data</param>
        void InsertWaveData(WaveData waveData);
        
        #endregion

        #region update station
        WaveData UpdateWaveSpot(Spot spot);
        #endregion
    }
}
